package com.ruoyi.caigou.mapper;

import com.ruoyi.IndexDtoByTwo;
import com.ruoyi.system.api.domain.caigou.BuyBackOrder;

import java.util.List;

/**
 * 采购退货单Mapper接口
 *
 * @author wl
 * @date 2024-10-25
 */
public interface BuyBackOrderMapper {
    /**
     * 查询采购退货单
     *
     * @param id 采购退货单主键
     * @return 采购退货单
     */
    public BuyBackOrder selectBuyBackOrderById(Integer id);
    public IndexDtoByTwo getBuyBackCountAndMoney();
    /**
     * 查询采购退货单列表
     *
     * @param buyBackOrder 采购退货单
     * @return 采购退货单集合
     */
    public List<BuyBackOrder> selectBuyBackOrderList(BuyBackOrder buyBackOrder);
    public List<BuyBackOrder> noReconList(BuyBackOrder buyBackOrder);

    /**
     * 新增采购退货单
     *
     * @param buyBackOrder 采购退货单
     * @return 结果
     */
    public int insertBuyBackOrder(BuyBackOrder buyBackOrder);

    /**
     * 修改采购退货单
     *
     * @param buyBackOrder 采购退货单
     * @return 结果
     */
    public int updateBuyBackOrder(BuyBackOrder buyBackOrder);

    /**
     * 删除采购退货单
     *
     * @param id 采购退货单主键
     * @return 结果
     */
    public int deleteBuyBackOrderById(Integer id);

    /**
     * 批量删除采购退货单
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteBuyBackOrderByIds(Integer[] ids);

    /**
     * 根据退货单号查询退货单数量
     *
     * @param buyBackOrderCode 退货单号
     * @return 结果
     */
    public int selectBuyBackOrderCodeCountByCode(String buyBackOrderCode);

    int updateBuyBackOrderByOrderCode(BuyBackOrder buyBackOrder);

    BuyBackOrder selectBuyBackOrderByBuyBackOrderCode(String buyBackOrderCode);

    List<BuyBackOrder> selectBuyBackOrderByIds(Integer[] ids);

    List<BuyBackOrder> selectBuyBackOrderListForReciveOrder(BuyBackOrder buyBackOrder);
}
